.TH std::execution::transfer 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::execution::transfer \- std::execution::transfer

.SH Synopsis
   Defined in header <execution>
   execution::sender auto transfer(

       execution::sender auto input,
       execution::scheduler auto scheduler

   );

.SH Parameters

   input     - sender to be transfered on the scheduler
   scheduler - scheduler on which the sender will run

.SH Return value

   Returns a sender describing the transition from the execution agent of the input
   sender to the execution agent of the target scheduler.

.SH Example

   Possible usage of execution::transfer.

 execution::scheduler auto cpu_sched = get_system_thread_pool().scheduler();
 execution::scheduler auto gpu_sched = cuda::scheduler();

 execution::sender auto cpu_task = execution::schedule(cpu_sched);
 // cpu_task describes the creation of a new task on the system thread pool

 execution::sender auto gpu_task = execution::transfer(cpu_task, gpu_sched);
 // gpu_task describes the transition of the task graph described by cpu_task to the GPU
